/**
 * Copyright (c) 2010-2011 Pierre Labatut
 *
 * This file is part of Space-Chronicles project.
 *
 * Space-Chronicles is free software: you can redistribute it and/or modify it
 * under the terms of its license which may be found in the accompanying
 * LICENSE file or <http://code.google.com/p/space-chronicles/>.
 */
package space.video;

import java.util.logging.Level;
import java.util.logging.Logger;
import javax.media.opengl.GLProfile;
import space.debug.DbgGL;
import space.game.splash.InitializationTask;

/**
 * Initialize the framework. Should be called at the very beginning of the
 * application exection to allow a proper initialization of thire party
 * libraries
 * - Load framework configuration
 * - Test and initialize libraries
 * - Check resources availability
 */
public class VideoInitializationTask implements InitializationTask {

    static private final Logger logger = Logger.getLogger(
            VideoInitializationTask.class.getName());

    public String title() {
        return "Initialize Video";
    }

    public void run() {
        logger.info("Initialize JOGL");
        DbgGL.initSingleton();
        logger.log(Level.INFO, "GLProfile level {0}",
                GLProfile.getDefault().getName());
        logger.log(Level.INFO, "GLProfile level {0}",
                GLProfile.glAvailabilityToString());
    }
}
